-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[BUG]: Handle version file creation with empty file paths #4552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Handle version file creation with empty file paths #4552
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
Fix Version File Creation with Empty File Paths This PR addresses a bug in the version file creation process. When compaction flushes to sysdb with empty file paths (which happens when there are no changes to segments after applying logs), the system previously failed to handle this case correctly, leading to versions with empty file paths in the version file. After garbage collection, this could result in missing data on S3. Key Changes: Affected Areas: This summary was automatically generated by @propel-code-bot |
@@ -21,6 +23,10 @@ type Collection struct { | |||
TotalRecordsPostCompaction uint64 | |||
SizeBytesPostCompaction uint64 // Note: This represents the size of the records off the log | |||
LastCompactionTimeSecs uint64 | |||
IsDeleted bool | |||
VersionFileName string | |||
CreatedAt time.Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is created at different than the Ts field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know. The person with that knowledge decided to leave us :(
ec35f46
to
bbf5511
Compare
## Description of changes - Improvements & Bug fixes - It can happen that compaction flushes to sysdb with empty file paths. This happens when there are no changes to the segments after applying the logs. - The sysdb handles this by keeping the previous segment file paths - However versioning missed handling this case in the version file. This led to creation of versions with empty file paths in the version file. - Consequently, after GC deletes all old versions and only leaves this version with empty file paths, there is no data on S3. - New functionality ## Test plan - Added a local test with mock s3 ## Documentation Changes None
This PR cherry-picks the commit 464c2e5 onto rc/2025-05-16. If there are unresolved conflicts, please resolve them manually. Co-authored-by: Sanket Kedia <[email protected]>
Description of changes
Improvements & Bug fixes
New functionality
Test plan
Documentation Changes
None